﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:Corina.Controls.Silverlight;assembly=Corina.Controls.Silverlight">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Brushes.xaml" />
        <ResourceDictionary Source="Fonts.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="controls:PromptDialog">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="OverlayBrush" Value="{StaticResource PageOverlayBrush}" />
        <Setter Property="OverlayOpacity" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:PromptDialog">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <Style x:Key="ButtonStyle" TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource TransparentWhiteBrush}" />
                                <Setter Property="Foreground" Value="{StaticResource BlackColorBrush}" />
                                <Setter Property="Padding" Value="3" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="BorderBrush" Value="{StaticResource GrayBrush2}" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid x:Name="grid"
                                                  Width="15"
                                                  Height="14"
                                                  HorizontalAlignment="Center"
                                                  VerticalAlignment="Center"
                                                  Background="{StaticResource TransparentWhiteBrush}">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <DoubleAnimation Duration="0"
                                                                                 Storyboard.TargetName="X"
                                                                                 Storyboard.TargetProperty="Opacity"
                                                                                 To="0.95" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0"
                                                                                 Storyboard.TargetName="X"
                                                                                 Storyboard.TargetProperty="Opacity"
                                                                                 To="0.85" />
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0"
                                                                                 Storyboard.TargetName="X"
                                                                                 Storyboard.TargetProperty="Opacity"
                                                                                 To="0.5" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Path x:Name="X_Fuzz2"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="{StaticResource FuzzBrush2}"
                                                      Opacity="1"
                                                      RenderTransformOrigin="0.5,0.5"
                                                      Stretch="Fill"
                                                      Stroke="{StaticResource FuzzBrush2}"
                                                      Visibility="Collapsed">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="1.3" ScaleY="1.3" />
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path x:Name="X_Fuzz1"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="{StaticResource FuzzBrush1}"
                                                      Opacity="1"
                                                      RenderTransformOrigin="0.5,0.5"
                                                      Stretch="Fill"
                                                      Stroke="{StaticResource FuzzBrush1}"
                                                      Visibility="Collapsed">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="1.1" ScaleY="1.1" />
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path x:Name="X_Fuzz0"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="{StaticResource FuzzBrush3}"
                                                      Opacity="1"
                                                      Stretch="Fill"
                                                      Stroke="{StaticResource FuzzBrush3}"
                                                      Visibility="Collapsed" />
                                                <Path x:Name="X"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="{StaticResource WhiteColorBrush}"
                                                      Opacity="0.7"
                                                      Stretch="Fill"
                                                      Stroke="{StaticResource GrayBrush3}" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>

                        <Grid x:Name="Overlay"
                              Margin="0"
                              HorizontalAlignment="Stretch"
                              VerticalAlignment="Stretch"
                              Background="{TemplateBinding OverlayBrush}"
                              Opacity="{TemplateBinding OverlayOpacity}" />
                        <Grid x:Name="ContentRoot"
                              Width="{TemplateBinding WindowWidth}"
                              Height="{TemplateBinding WindowHeight}"
                              Margin="{TemplateBinding ContentMargin}"
                              HorizontalAlignment="{TemplateBinding HorizontalWindowAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalWindowAlignment}"
                              RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <Border Background="{StaticResource WhiteColorBrush}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    Effect="{StaticResource DropShadowBrush}">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Border x:Name="Chrome"
                                            Width="Auto"
                                            Background="Transparent"
                                            BorderThickness="0,0,0,1">
                                        <Grid Width="Auto" Height="Auto">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition />
                                                <ColumnDefinition Width="30" />
                                            </Grid.ColumnDefinitions>
                                            <ContentControl Margin="20,21,8,0"
                                                            HorizontalAlignment="Stretch"
                                                            VerticalAlignment="Center"
                                                            Content="{TemplateBinding Title}"
                                                            FontSize="18.667"
                                                            IsTabStop="False" />
                                            <Button x:Name="CloseButton"
                                                    Grid.Column="1"
                                                    Width="15"
                                                    Height="14"
                                                    Margin="0,5,0,0"
                                                    HorizontalAlignment="Center"
                                                    VerticalAlignment="Top"
                                                    Command="{TemplateBinding CloseCommand}"
                                                    IsTabStop="False"
                                                    Style="{StaticResource ButtonStyle}" />
                                            <Rectangle Width="80"
                                                       Height="6"
                                                       Margin="20,15,0,0"
                                                       HorizontalAlignment="Left"
                                                       VerticalAlignment="Top"
                                                       Fill="{StaticResource BrandingBrush}" />
                                        </Grid>
                                    </Border>
                                    <Border Grid.Row="1"
                                            Margin="7"
                                            Background="{TemplateBinding Background}">
                                        <ContentPresenter x:Name="ContentPresenter"
                                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                          Content="{TemplateBinding Content}"
                                                          ContentTemplate="{TemplateBinding ContentTemplate}" />
                                    </Border>
                                </Grid>
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SwitcherStyle" TargetType="CheckBox">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="72" />
                        </Grid.ColumnDefinitions>
                        <TextBlock VerticalAlignment="Center" Text="{TemplateBinding Content}" />


                        <Grid Grid.Column="1" Height="20">
                            <Grid Background="{StaticResource HighlightBrush}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="20" />
                                </Grid.ColumnDefinitions>
                                <TextBlock Margin="12,0"
                                           VerticalAlignment="Center"
                                           Text="On" />
                                <Rectangle Grid.Column="1"
                                           Margin="2"
                                           Fill="White" />
                            </Grid>
                            <Grid Background="{StaticResource GrayBrush1}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityInverseConverter}, RelativeSource={RelativeSource TemplatedParent}}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="20" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="1"
                                           Margin="12,0"
                                           HorizontalAlignment="Right"
                                           VerticalAlignment="Center"
                                           Text="Off" />
                                <Rectangle Margin="2" Fill="{StaticResource HighlightBrush}" />
                            </Grid>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Wall3D_ListBoxItemStyle" TargetType="ListBoxItem">
        <Setter Property="Padding" Value="3" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="TabNavigation" Value="Local" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid x:Name="grid"
                          Background="{TemplateBinding Background}"
                          IsHitTestVisible="False">
                        <Grid x:Name="reflex"
                              Width="389"
                              Height="292"
                              Margin="0,0,0,-326"
                              IsHitTestVisible="False">
                            <Image x:Name="reflex_image"
                                   Width="389"
                                   Height="292"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Bottom"
                                   IsHitTestVisible="False"
                                   OpacityMask="{x:Null}"
                                   RenderTransformOrigin="0.5,0.5"
                                   Source="{Binding }">
                                <Image.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="-1" />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform Y="310" />
                                    </TransformGroup>
                                </Image.RenderTransform>
                            </Image>
                            <Rectangle x:Name="reflex_cover"
                                       HorizontalAlignment="Stretch"
                                       VerticalAlignment="Stretch"
                                       RenderTransformOrigin="0.5,0.5"
                                       Stroke="{x:Null}">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform Y="310" />
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                                <Rectangle.Fill>
                                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                        <GradientStop Color="#72000000" />
                                        <GradientStop Offset="0.89" Color="#FF000000" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                        </Grid>
                        <Image x:Name="row1"
                               Width="389"
                               Height="292"
                               Margin="0,0,0,-290"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Bottom"
                               Source="{Binding }" />
                        <Rectangle x:Name="border"
                                   Width="389"
                                   Height="292"
                                   Margin="0,0,0,-290"
                                   HorizontalAlignment="Left"
                                   VerticalAlignment="Top"
                                   Fill="{x:Null}"
                                   Opacity="0.7"
                                   Stroke="#FF1D202A"
                                   StrokeThickness="4" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ItemsPanelTemplate x:Key="Wall3D_ItemsPanelTemplate">
        <controls:CircularPanel3D Width="788"
                                  Height="571"
                                  Align="Center"
                                  AngleItem="24"
                                  Background="#00000000"
                                  InitialAngle="343"
                                  IsDragOn="True"
                                  OffsetY="180"
                                  Radius="1050" />
    </ItemsPanelTemplate>
</ResourceDictionary>
